package com.sudo.dao.admin.model.bo;

import com.sudo.common.utils.PatternUtil;
import com.sudo.common.validenum.EnumValue;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author 为道日损 2020-04-27 11:36
 */
@Data
public class SysMenuUpdateBO {

    @Pattern(regexp= PatternUtil.MENU_CODE,message="菜单代码必须是3~30位数字、字母或下划线")
    private String parentCode;

    @NotBlank(message = "菜单名称不能为空")
    private String menuName;

    @Pattern(regexp=PatternUtil.MENU_CODE,message="菜单代码必须是3~30位数字、字母或下划线")
    private String menuCode;

    private String menuUrl;

    @NotBlank(message = "状态不能为空")
    @EnumValue(strValues = {"ON","OFF"},message = "状态必须为指定值ON/OFF")
    private String status;
    private String menuIcon;

    private Integer sort;

    @Length(max = 255,message = "备注最大长度不超过255位")
    private String note;

}
